<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script>
    function tapSubmit() {
        name = document.getElementById("username").value;
        if (name == "admin") {
            detail = document.getElementById("detail").value;
            alert("注册成功，你的简介是" + detail);
            return false;
        }
        else {
            alert("用户名不存在或密码错误!");
            return false;
        }
    }
</script>

<body>
    <h2>用户注册</h2>
    <form action="xxx" onsubmit="return tapSubmit()">
        <p>用户名: <input id="username"></p>
        <p>密码: <input type="password"></p>
        <p>性别:
            <select>
                <option selected="selected">请选择</option>
                <option>男</option>
                <option>女</option>
            </select>
        </p>
        <p>学历:
            <select>
                <option selected="selected">请选择</option>
                <option>本科</option>
                <option>专科</option>
            </select>
        </p>
        <p>自我介绍: <textarea id="detail" cols="20" rows="8"></textarea></p>
        <p><input type="submit" value="提交"></p>
    </form>
</body>

</html>